*comment Copyright 2010 by Dan Fabulich. *comment *comment Dan Fabulich licenses this file to you under the *comment ChoiceScript License, Version 1.0 (the "License"); you may *comment not use this file except in compliance with the License. *comment You may obtain a copy of the License at *comment *comment http://www.choiceofgames.com/LICENSE-1.0.txt *comment *comment See the License for the specific language governing *comment permissions and limitations under the License. *comment *comment Unless required by applicable law or agreed to in writing, *comment software distributed under the License is distributed on an *comment "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, *comment either express or implied. *set time (time + (3-(speed/4))) You've reached familiar territory now, and are perhaps a week or two away from reaching your destination, a city large enough to make your journey worthwhile. *page_break One night, you are awoken from sleep by the sound of a scuffle outside the wagon. *temp martial_modifier *set martial_modifier 0 *temp called *set called false *label awoken *fake_choice #Go back to sleep. It's probably nothing. You turn over to go back to sleep. *page_break Suddenly, two cowled men burst into your wagon! *set martial_modifier -10 *goto fight *if (called = false) #Call to your guards posted outside. There is no response. *set called true *goto awoken #Investigate in person. There are two men standing over the unmoving bodies of the guards you had posted outside tonight. *if ((dedication > 50) and (called = false)) It seems they haven't noticed you yet. *set martial_modifier +10 *goto fight *else Seeing you emerge, the cowled men charge! *goto fight *label fight *temp attacker *if alexander < 50 *set attacker "Alexander" *goto begin *elseif yishai < 40 *set attacker "Yishai" *goto begin *elseif ephraim < 30 *set attacker "Ephraim" *goto begin *else *set attacker "no one. I'm under Alexander's employ, but it was Josiah's idea to attack you\" -- he looks in the direction of his companion -- \"not Alexander's" *goto begin *label begin *temp IDknown *set IDknown false *temp rounding *set guards -2 *temp round *set round 1 *temp betrayer *set betrayer false *temp offer *set offer 0 *temp metals_offer *set metals_offer 0 *temp gems_offer *set gems_offer 0 *label next_round2 *set martial_modifier (martial_modifier + ((dedication %+ martial_modifier)/10)) *if (round > 0) *if ((0 - martial_modifier) > 29) You're utterly spent. Everything is becoming hazy and indistinct. *goto fight_choice *elseif ((0 - martial_modifier) > 19) You're very tired, and are having trouble concentrating. *goto fight_choice *elseif ((0 - martial_modifier) > 9) You're somewhat winded. *label fight_choice *choice *if (round = 1) #Ask "What is the meaning of this?!" *set round +1 *if Leadership > 70 *if attacker = "Alexander" "Alexander sends his regards," one of them says. He leers, and both approach menacingly, swords drawn. *goto next_round2 *elseif attacker = "Yishai" "Yishai's orders," comes the reply. Both advance slowly, swords drawn. *goto next_round2 *elseif attacker = "Ephraim" "Uh, Ephraim has been insulted by you long enough." They seem uncertain, but they advance nonetheless, swords drawn. *set martial_modifier +10 *goto next_round2 *else "We, uh, Ephraim sent us," says one. Is that surprise on the face of the other? It's hard to tell in the cowl he's wearing. But they're still advancing on you, slowly, swords drawn. *set martial_modifier +10 *goto next_round2 *else They only laugh disdainfully. *goto next_round2 #Bribe them *if (betrayer) "We won't fall for that again!" They attack. *goto attack_2 With what? *choice #Cash You know you have ${funds} hidden away -- how much will you offer? *choice #All of it. *set offer funds *goto weigh_offer2 *if (funds > 99) #100. *set offer 100 *goto weigh_offer2 *if (funds > 499) #500. *set offer 500 *goto weigh_offer2 *if (funds > 999) #1000. *set offer 1000 *goto weigh_offer2 *if (funds > 1999) #2000. *set offer 2000 *goto weigh_offer2 #Never mind. *goto next_round2 *selectable_if (metals > 0) #Silver and gold You have ${metals} bars -- how many will you offer? *choice *selectable_if (metals > 1) #All of them. *set metals_offer metals *goto weigh_offer2 *selectable_if (metals > 3) #The majority of them. *set metals_offer (metals * (2/3)) *goto weigh_offer2 *selectable_if (metals > 5) #A small number. *set metals_offer (metals * (1/3)) *goto weigh_offer2 #Only one. *set metals_offer 1 *goto weigh_offer2 #Never mind. *goto next_round2 *selectable_if (gems > 0) #Gemstones You have ${gems} stones -- how many will you offer? *choice *selectable_if (gems > 1) #All of them. *set gems_offer gems *goto weigh_offer2 *selectable_if (gems > 3) #The majority of them. *set gems_offer (gems * (2/3)) *goto weigh_offer2 *selectable_if (gems > 5) #A small number. *set gems_offer (gems * (1/3)) *goto weigh_offer2 #Only one. *set gems_offer 1 *goto weigh_offer2 #Never mind. *goto next_round2 #Never mind. *goto next_round2 *hide_reuse #Threaten them *if (Leadership > 70) *if (attacker = "Alexander") They look unsure of themselves, but press on. *set martial_modifier +10 *goto next_round2 *elseif (attacker = "Ephraim") One of the men looks like he's about to turn and run, but the other grabs his cloak and holds him. "Stay. Here." he says through gritted teeth. This may be a good time to strike. *set martial_modifier +20 *goto next_round2 *elseif (attacker = "Yishai") "You don't scare us." *goto next_round2 *else You see the look on one of the men's face change from unease to outright terror. He bolts and runs, and his partner curses under his breath. *goto one_down *elseif (attacker = "Alexander") "Not likely, worm." *goto next_round2 *elseif (attacker = "Ephraim") They look unsure of themselves, but press on. *set martial_modifier +10 *elseif (attacker = "Yishai") "You'll not confuse us." *goto next_round2 *else They look unsure of themselves, but press on. *set martial_modifier +10 #Press the attack! *label attack_2 *if round = 1 You draw your sword. *if ((Martial + martial_modifier) > 70) They're too slow to react as you press your advantage. You feint at one, then slash the other across the belly. He goes down. *set martial_modifier -15 *set Martial %+5 *goto one_down *elseif ((Martial + martial_modifier) > 40) You hold them off, but just barely. You can't seem to find an opening to make a successful strike yourself. *set Martial %+5 *set martial_modifier -25 *set round +1 *goto next_round2 *elseif ((Martial + martial_modifier) > 20) You try to parry, but fail. One of your attackers cuts a deep gash across your sword arm. It's not paralyzing, but a very painful injury. *set Martial %+5 *set martial_modifier -35 *set round +1 *goto next_round2 *else *if (Martial < 50) Their swordsmanship is too much for you. *goto deathline2 *else The fight has taken its toll, and you're simply overwhelmed. *label deathline2 One of the men sidesteps your clumsy swing and the other slips his blade between your ribs. *goto_scene death #Call for help *if (guards > 0) Your remaining guards rush over to your cart. "What happened?" they ask, and draw their blades to attack. *goto skirmish *else There is no response. Small wonder; you only had enough guards to post outside your cart, and they're all lying around you. *goto next_round2 *label weigh_offer2 "We can be reasonable, can't we? *if (metals_offer > 0) *set rounding "metals_offer" *gosub round I'll offer ${metals_offer} bars of precious metals for my life." *goto consider2 *elseif (gems_offer > 0) *set rounding "gems_offer" *gosub round I'll offer ${gems_offer} gemstones in exchange for my life." *goto consider2 *else How does ${offer} cash sound, and we forget this ever happened?" *label consider2 *temp needed *set needed 750 *if attacker = "Alexander" *set needed 1250 *if attacker = "Yishai" *set needed 1750 *temp value *set value ((offer + (metals_offer * 100)) + (gems_offer * 250)) *if attacker = "Yishai" *set value ((value + (metals_offer * 50)) + (gems_offer * 100)) *page_break *if (value < 300) They are insulted by your offer, and attack! *goto attack_2 *elseif (value < needed) One looks at the other, who shakes his head. "Not interested. Perhaps something more substantial..." *goto next_round2 *else They agree, and you assemble your ransom. As you open the prize before them, they put their swords away to examine their newfound wealth. *choice *if (attacker = "Alex-fake") #Ask them to leave the caravan. They leave. You never hear from them again. *set funds (funds - offer) *set metals (metals - metals_offer) *set gems (gems - gems_offer) *finish #Send them away, asking them to speak nothing of this. They're no more trouble for you. *set funds (funds - offer) *set metals (metals - metals_offer) *set gems (gems - gems_offer) *finish #Now is the perfect time to attack, while they're distracted! Catching him with his guard down, you run one of the men through with your sword. The other stumbles back and grabs his own weapon. He won't be so easy. *set martial_modifier +20 *set betrayer true *goto one_down *label one_down *set martial_modifier ((martial_modifier / 2) + 15) *temp HP *set HP 3 *label next_round *set martial_modifier (martial_modifier + ((dedication %+ martial_modifier)/10)) *if ((0 - martial_modifier) > 29) You're utterly spent. Everything is becoming hazy and indistinct. *goto last_choice *elseif ((0 - martial_modifier) > 19) You're exhausted, and are having trouble concentrating. *goto last_choice *elseif ((0 - martial_modifier) > 9) You're winded. *if (HP<1) That was it for your attacker, it seems; with one last gasp, he collapses on the ground. *goto aftermath *label last_choice *choice *hide_reuse #Demand to know who sent them. "It was ${attacker}." *set IDknown true *if (Leadership > 45) He's shaking. "Please, spare my life! I'll flee, I won't tell him!" *choice #Let him go. You never hear from him again. *finish #Not a chance. *set martial_modifier +15 *goto attack *else *goto next_round #Attack! *label attack *if ((Martial + martial_modifier) > 80) With one quick, merciful strike, you end his life. *set Martial %+5 *goto aftermath *elseif ((Martial + martial_modifier) > 65) You dodge one attack and manage to land a nasty blow of your own. *set HP -2 *set Martial %+5 *set martial_modifier -15 *set round +1 *goto next_round *elseif ((Martial + martial_modifier) > 50) You each manage to strike one another. You'll live, hopefully. *set HP -1 *set Martial %+5 *set martial_modifier -25 *set round +1 *goto next_round *elseif ((Martial + martial_modifier) > 35) Your opponent cuts you across the leg, deep. The pain is somewhat debilitating, but you stay on your feet. *set Martial %+5 *set martial_modifier -35 *set round +1 *goto next_round *else *if (Martial < 50) His swordsmanship is simply too much for you. *goto deathline *else The fight has taken its toll, and you're simply overwhelmed. *label deathline He sidesteps your clumsy swing, and seeing an opportunity, slips his blade between your ribs. *goto_scene death #Bribe him *if (betrayer) "Hah! I'm not falling for that again," he shouts, and attacks! *goto attack With what? *choice #Cash You know you have ${funds} hidden away -- how much will you offer? *choice #All of it. *set offer funds *goto weigh_offer *if (funds > 99) #100. *set offer 100 *goto weigh_offer *if (funds > 499) #500. *set offer 500 *goto weigh_offer *if (funds > 999) #1000. *set offer 1000 *goto weigh_offer *if (funds > 1999) #2000. *set offer 2000 *goto weigh_offer #Never mind. *goto next_round *selectable_if (metals > 0) #Silver and gold You have ${metals} bars -- how many will you offer? *choice *selectable_if (metals > 1) #All of them. *set metals_offer metals *goto weigh_offer *selectable_if (metals > 3) #The majority of them. *set metals_offer (metals * (2/3)) *goto weigh_offer *selectable_if (metals > 5) #A small number. *set metals_offer (metals * (1/3)) *goto weigh_offer #Only one. *set metals_offer 1 *goto weigh_offer #Never mind. *goto next_round *selectable_if (gems > 0) #Gemstones You have ${gems} stones -- how many will you offer? *choice *selectable_if (gems > 1) #All of them. *set gems_offer gems *goto weigh_offer *selectable_if (gems > 3) #The majority of them. *set gems_offer (gems * (2/3)) *goto weigh_offer *selectable_if (gems > 5) #A small number. *set gems_offer (gems * (1/3)) *goto weigh_offer #Only one. *set gems_offer 1 #Never mind. *goto next_round #Never mind. *goto next_round #Call for help *if (guards > 0) Your remaining guards rush over to your cart. "What happened?" they ask, and draw their blades to attack. *page_break *if (guards > HP) They make quick work of the last man. *goto aftermath *else *if (guards = 2) They put up a valiant fight, but they're simply outfought by this last desperate attacker. A few manage to score hits, but he cuts down many of them, and the survivors flee into the night. He turns his attention back to you, wary, breathing heavily. *set HP 1 *if (guards = 1) It's a nice attempt, but these guards are far outclassed by this last attacker. He cuts them down without a scratch, before turning his attention back to you. *set martial_modifier +15 *set guards 0 *goto next_round *else There is no response. Small wonder; all your guards are lying at your feet. *goto next_round *label skirmish *page_break *if (guards > 2) The cowled men are no match for your much greater numbers, and they are quickly dispatched. *goto aftermath *elseif (guards > 1) It's a tough fight, and several of your guards are killed or badly injured, but together you manage to fell your attackers. *set guards 1 *goto aftermath *else Unfortunately, what guards remain have met their match with these cowled men; they put up a decent fight, and even manage to bring down one of your attackers with a lucky swing, but they don't last long. Your last surviving guard flees into the night. *set guards 0 *set martial_modifier +20 *goto one_down *label weigh_offer "We can be reasonable, can't we? *if (metals_offer > 0) *set rounding "metals_offer" *gosub round I'll offer ${metals_offer} bars of precious metals for my life." *goto consider *elseif (gems_offer > 0) *set rounding "gems_offer" *gosub round I'll offer ${gems_offer} gemstones in exchange for my life." *goto consider2 *else How does ${offer} cash sound, and we forget this ever happened?" *label consider *temp needed *set needed 750 *if attacker = "Alexander" *set needed 1250 *if attacker = "Yishai" *set needed 1750 *temp value *set value ((offer + (metals_offer * 100)) + (gems_offer * 250)) *if attacker = "Yishai" *set value ((value + (metals_offer * 50)) + (gems_offer * 100)) *page_break *if (value < (300 - (100 * HP))) He is insulted by your offer, and attacks! *goto attack *elseif ((value + ((3 - HP) * 200)) < needed) He shakes his head. "Not interested. Perhaps something more substantial..." *goto next_round *else He agrees, and you assemble your ransom. As you open the prize before him, he sheathes his sword to examine his newfound wealth. *choice *if (attacker = "Alex-fake") #Ask him to leave the caravan. He leaves. You never hear from him again. *set funds (funds - offer) *set metals (metals - metals_offer) *set gems (gems - gems_offer) *finish #Send him away, asking him to speak nothing of this. He presents no more trouble for you. *set funds (funds - offer) *set metals (metals - metals_offer) *set gems (gems - gems_offer) *finish #Now is the perfect time to attack, while he's distracted! *set martial_modifier +40 *set betrayer true *goto attack *label aftermath *if ((0 - martial_modifier) > 50) *if (guards > 0) You're gravely wounded, and the last thing you hear before falling unconscious is your surviving guards' decision to lead your wagon off from the caravan to head to the nearest town for treatment. *page_break *if (guards > 1) Their loyalty proves to be a valuable asset. They head to the town as quickly as possible. *line_break *if (animals < 2) Unfortunately, your beasts of burden do not. They are unable to make the necessary pace, and nearly collapse along the way. You do not survive long enough for a messenger sent on foot to return with a healer. *goto_scene death *else You arrive in town and are well cared for by the local healer. In a few months time, you are strong enough to set off again. *set time +4 *finish *else Unfortunately, they do not seem unduly concerned, and set off at a leisurely pace. You slip in and out of consciousness, at one point hearing two guards debating how long you might last and who will get what share of the goods, before everything goes dark. *goto_scene death *elseif ((0-martial_modifier) > 30) You have some ugly wounds, but nothing that won't heal given enough time and careful bandaging. *finish *elseif ((0 - martial_modifier) > 10) You have some new cuts and bruises, but given what just happened, you're none too worse for wear. *finish *elseif (martial_modifier < 10) You're a little banged up, but you'll be fine. *finish *else You feel exhilarated. *finish *label round *temp rounded *set rounded 0 *temp val *label roundloop *set val {rounding} *if (val - rounded) > 1 *set rounded +1 *goto roundloop *elseif (val - rounded) = 1 *comment Need to account for rounding an integer value. *set rounded +1 *goto roundfinish *else *label roundfinish *setref rounding rounded *return